package org.newbee;

import org.hibernate.context.spi.CurrentTenantIdentifierResolver;

/**
 * Created by yujie on 2017/6/24.
 */
public class TenantIdResolver implements CurrentTenantIdentifierResolver {

    public static ThreadLocal<String> tenantId = new ThreadLocal<String>();

    public String resolveCurrentTenantIdentifier() {
        return tenantId.get();
    }

    public boolean validateExistingCurrentSessions() {
        return true;
    }
}
